home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
R-Shows
/
(c)woc iii 85.d64
/
disk tidier.z
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
69 lines
10 REM DISK TIDIER, DAVID WILLIAMS, 1983
20 REM MODIFIED BY DAVID BRADLEY, 1983
30 :
40 REM PROGRAM HELPS WITH THE CHORE OF
50 REM DELETING UNWANTED FILES FROM DISKS.
60 REM PROGRAM IS IN BASIC 2.0... SHOULD
70 REM WORK ON PET/CBM'S OR ON COMMODORE-64
80 :
90 N=0:DIM F$(500)
100 PRINT:PRINT"WHICH DRIVE? (0/1) ";
110 GET DN$:IF DN$ <"0" OR DN$ > "1" THEN 110
120 PRINT DN$:PRINT
130 OPEN15,8,15
140 OPEN1,8,0,"$"+DN$
150 INPUT#15,E,E$:IF E$<>"OK" THEN PRINT E$:GOTO 680
160 GET#1,G$,G$,G$,G$:IFG$=""THEN680
170 GET#1,A$,B$:PRINT (ASC(A$+CHR$(0))+256*ASC(B$+CHR$(0)));
180 GET#1,G$:IFG$="" THEN 200
190 PRINT G$;:GOTO 180
200 PRINT: PRINT:PRINT "S[146]CRATCH OR L[146]EAVE FOLLOWING FILES?"
210 PRINT:GET#1,G$,G$:IFG$=""THEN380
220 GET#1,G$,G$
230 F$=""
240 GET#1,G$:IFG$="" THEN 210
250 IF G$<>CHR$(34)THEN240
260 GET#1,G$:IFG$=CHR$(34)THEN280
270 F$=F$+G$:GOTO260
280 DB$=" "
290 LF=LEN(F$):FF$=F$+LEFT$(DB$,16-LF)
300 PRINTFF$," ";
310 GET G$:IF G$<>"S" AND G$<>"L" THEN 310
320 IFG$="S"THENGG$="SCRATCH"
330 IFG$="L"THENGG$="LEAVE"
340 PRINT" ";GG$;"[146]";
350 IF G$="S" THEN F$(N)=F$:N=N+1
360 GET#1,G$:IF G$<>"" THEN 360
370 GOTO210
380 N=N-1:CLOSE1
390 IF N<0 THEN 680
400 PRINT:PRINT "LIST OF FILES TO BE SCRATCHED:":PRINT
410 FOR I=0 TO N
420 PRINT F$(I)
430 FOR J=1 TO 500:NEXT
440 NEXT
450 PRINT:PRINT "CORRECT? (Y/N) ";
460 GET G$:IF G$<>"Y" AND G$<>"N" THEN 460
470 PRINTG$
480 IF G$="Y" THEN 540
490 PRINT:PRINT "A[146]BORT OR D[146]ISPLAY LIST AGAIN? ";
500 GET G$:IF G$<>"A" AND G$<>"D" THEN 500
510 PRINT G$
520 IF G$="A" THEN 680
530 GOTO 400
540 PRINT:PRINT "WORKING.... COME BACK LATER!":PRINT
550 PRINT#15,"V";DN$
560 PRINT"COLLECTING FOR FIRST TIME"
570 INPUT#15,E,E$:IFE$<>"OK" THEN PRINTE$:GOTO 680
580 FOR I=0 TO N
590 PRINT#15,"S";DN$;":";F$(I)
600 PRINT "SCRATCHING ";F$(I)
610 INPUT#15,E,E$,E1
620 IF E$<>"FILES SCRATCHED" OR E1<>1 THEN PRINT E;E$;E1:GOTO680
630 NEXT
640 PRINT#15,"V";DN$
650 PRINT"COLLECTING FOR SECOND TIME"
660 INPUT#15,E,E$:IFE$<>"OK" THEN PRINTE$:GOTO 680
670 PRINT:PRINT"ALL DONE"
680 CLOSE1:CLOSE15:END